From 7e5b6dab578789cc86618b2484d4910117e9fd6b Mon Sep 17 00:00:00 2001 From: Kalita Alexey Date: Fri, 20 Jan 2017 08:12:12 +0300 Subject: [PATCH] Fixed tests and removed the unnecessary comment --- src/cargo/core/manifest.rs | 1 - tests/build.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cargo/core/manifest.rs b/src/cargo/core/manifest.rs index a78e1856e..a385c9a8f 100644 --- a/src/cargo/core/manifest.rs +++ b/src/cargo/core/manifest.rs @@ -113,7 +113,6 @@ impl Encodable for TargetKind { fn encode(&self, s: &mut S) -> Result<(), S::Error> { match *self { TargetKind::Lib(ref kinds) | - // TODO: I am not sure whether it should be encoded like a library or like an example TargetKind::ExampleLib(ref kinds) => { kinds.iter().map(LibKind::crate_type).collect() } diff --git a/tests/build.rs b/tests/build.rs index af1ad23e0..549ae35e8 100644 --- a/tests/build.rs +++ b/tests/build.rs @@ -1924,7 +1924,7 @@ fn example_as_rlib() { crate-type = ["rlib"] "#) .file("src/lib.rs", "") - .file("examples/ex.rs", "fn a() {}"); + .file("examples/ex.rs", ""); assert_that(p.cargo_process("build").arg("--example=ex"), execs().with_status(0)); assert_that(&p.example_lib("ex", "rlib"), existing_file()); @@ -1964,7 +1964,7 @@ fn example_as_proc_macro() { crate-type = ["proc-macro"] "#) .file("src/lib.rs", "") - .file("examples/ex.rs", ""); + .file("examples/ex.rs", "#![feature(proc_macro)]"); assert_that(p.cargo_process("build").arg("--example=ex"), execs().with_status(0)); assert_that(&p.example_lib("ex", "proc-macro"), existing_file()); -- 2.30.2